<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title></title>
    <link rel="stylesheet" href="/stylesheets/createArticle.css">
    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script>
  </head>

  <body>
    <%if(article && auther){%>
      <form class="" action="/update/<%=article.id%>" method="post">
        <input type="text" name="title" value="<%=article.title%>" placeholder="请输入文章标题">
        <textarea name="content" rows="18" cols="80" placeholder="请输入文章内容..." ><%=article.content%></textarea>
        <input type="submit" name="" value=" 更新文章 ">
      </form>
      <%}else if(article){%>
          <h2 style="margin:auto;width:100%;text-align:center" ><%= article.title%></h2>
          <p style="margin:auto:width:100%"><%=article.content%></p>

    <%}else{%>
      <form class="" action="/create" method="post">
        <input type="text" name="title" value="" placeholder="请输入文章标题">
        <textarea name="content" rows="18" cols="80" placeholder="请输入文章内容..."></textarea>
        <input type="submit" name="" value=" 创建文章 ">
      </form>
    <%}%>

    <script type="text/javascript" src="/js/createArticle.js"></script>
  </body>
</html>
